<!-- 跟单-发起人详情 -->
<template>
  <div class="cell" @click="cellClick">

     <LImage class="texture2" :src="Config.img('texture2.png')"></LImage>

    <div class="row acenter">
     <text class="font32 text1">{{T(item.strategyName)}}</text>
       <div class="cell-exch bk4" v-if="item.exchangeName">
        <text class="font20 text1">{{item.exchangeName}}</text>
      </div>
      <div class="all"></div>
      <text :class="['font32', Config.upDownFont(item.realYearIncome)]">{{item.realYearIncome+'%'}}</text>
    </div>
    
    <div class="row acenter">
      <div class="cell-tag bk4" v-for="(item, index) in item.mark" v-bind:key="index">
        <text class="font20 main-t1">{{item}}</text>
      </div>
      <div class="all"></div>
      <text class="font24 text3">{{T('年化收益率')}}</text>
    </div>

    <div :class="['cell-type', item.isContract=='spot' ? '' : 'cell-type-hong']">
      <text :class="['font22', item.isContract=='spot'  ? 'main-t1' : 'udRed-t1']">{{item.isContract=='spot' ? T('币币') : T('合约')}}</text>
    </div>
  </div>
</template>

<script>
import jconfig from "@/_js/config";

import I18N from "@/_i18n/i18n";
var T = I18N.t;
export default {

  props:{
    item: Object,
  },
  
  data() {
    return {
      T:T,
      Config:jconfig,
    };
  },

  mounted() {
    jconfig.init(()=>{},[jconfig.OPT_UP_DOWN]);
  },

  methods: {
    
    /********************************** 点击方法*/
    //策略点击
    cellClick() {
      this.$emit('cell', this.item);
    }
  },
};
</script>

<style src="@/_css/style.css"></style>
<style scoped>
.cell {
  flex-direction: column;
  justify-content: space-between;
  border-radius: 8px;
  padding: 50px;
}
.cell-exch {
  justify-content: center;
  align-items: center;
  height: 33px;
  border-radius: 20px;
  border-width: 2px;
  padding:0 15px;
  margin-left: 12px;
}
.cell-tag {
  justify-content: center;
  align-items: center;

  height: 33px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
  border-width: 2px;
  padding-left: 0 12px;
  margin-right: 10px;
}
.cell-type{
  position: absolute;
  top: 0;
  right: 0;

  flex-direction: row;
  align-items: center;
  height: 32px;
  padding-left: 10px;
  padding-right: 10px;
  border-top-right-radius: 8px;
  border-bottom-left-radius: 8px;

  background-color: rgba(22, 119, 254, 0.1);
}
.cell-type-hong{
  background-color: rgba(252, 97, 128, 0.1);
}
</style>
